﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Drawing;


namespace HAVTKPack
{


    public class VectorSetup
    {


        #region 构造函数

        public VectorSetup()
        {


        }

        #endregion

        #region 字段属性


        bool _isShowVector = false ;

        public bool IsShowVector
        {
            get { return _isShowVector; }
            set { _isShowVector = value; }
        }


        bool _isVaryLength = false;
        /// <summary>
        /// true表示使用不定长模式；false表示使用定长模式
        /// </summary>
        public bool IsVaryLength
        {
            get { return _isVaryLength; }
            set { _isVaryLength = value; }
        }

        double _totalLength = 0.0;
        /// <summary>
        /// 总长度
        /// </summary>
        public double TotalLength
        {
            get { return _totalLength; }
            set { _totalLength = value; }
        }




        int tipResolution = 6;

        public int TipResolution
        {
            get { return tipResolution; }
            set { tipResolution = value; }
        }

        double tipRadius = 0.055;

        public double TipRadius
        {
            get { return tipRadius; }
            set { tipRadius = value; }
        }

        double tipLength = 0.3;

        public double TipLength
        {
            get { return tipLength; }
            set { tipLength = value; }
        }

        int shaftResolution = 6;

        public int ShaftResolution
        {
            get { return shaftResolution; }
            set { shaftResolution = value; }
        }

        double shaftRadius =0.01;

        public double ShaftRadius
        {
            get { return shaftRadius; }
            set { shaftRadius = value; }
        }



        double scaleRatio = 1.0;
        /// <summary>
        /// 缩放比例
        /// </summary>
        public double ScaleRatio
        {
            get { return scaleRatio; }
            set { scaleRatio = value; }
        }




        Color color = Color.Black;

        public Color Color
        {
            get { return color; }
            set { color = value; }
        }

      
        #endregion

      

        #region 内部方法


        #endregion

        #region 公用方法


        public void SetVectorSetup(VectorSetup setup)
        {
            if (setup == null)
            {
                return;
            }


            this._isShowVector = setup.IsShowVector;

            this.IsVaryLength = setup.IsVaryLength;

            this.ScaleRatio = setup.ScaleRatio;

            this.TotalLength = setup.TotalLength;




            this.tipResolution = setup.tipResolution;

            this.tipRadius = setup.tipRadius;

            this.tipLength = setup.tipLength;

            this.shaftResolution = setup.shaftResolution;

            this.shaftRadius = setup.shaftRadius;

            this.color = setup.color;




          


        }

        public void UpdateVectorVisibility(bool isVectorVisibility)
        {
            this._isShowVector = isVectorVisibility;
        
        }


        #endregion

        #region 属性改变方法


        #endregion





    }
}
